// Helper.h: interface for the CHelper class.
//
//////////////////////////////////////////////////////////////////////

#include<string.h>
#include<iostream>

class ArgumentParser;

class CHelper  
{
public:
	friend class CArgumentParser;
	
	char** getBuffer();
	CHelper(int nOptions);
	
	void fillHeadMessage(char *strMessage);
	void fillProgramName(char *strMessage);
	void fillTailMessage(char *strMessage);
	void fillUsageLine(char *strMessage);
	
	void displayHelp();
	virtual ~CHelper();

protected:
	int m_nOptions;
	char** m_straHelp;		//Stores the help for the options
	
	//Display parameters
	char* m_strProgramName;		//Store the program name
	char* m_strHeadMessage;	//Stores the copyright message etc
	char* m_strUsageLine;	//Stores the usage-line
	char* m_strTailMessage;	//Stores info to be displayed at end

	void fillHelpForOption(int nPos, char cOption, char *strValue);//Fill in help
private:
	void deleteAndCopy(char**dest,char*source);
};

